//
//  ILView.m
//  PlayerWorld
//
//  Created by 汪的一声就哭了！ on 16/6/25.
//  Copyright © 2016年 刘成. All rights reserved.
//

#import "ILView.h"

@implementation ILView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] init];
        [self addSubview:self.imageView];
        self.imageView.userInteractionEnabled = YES;
        self.imageView.image = [UIImage imageNamed:@"quan"];
        
        self.label = [[UILabel alloc] init];
        [self addSubview:self.label];
        self.label.userInteractionEnabled = YES;
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat width = self.bounds.size.width;
    CGFloat height = self.bounds.size.height;
    self.imageView.frame = CGRectMake(10, height/2-5, 10, 10);
    self.label.frame = CGRectMake(20, 0, width-20, height);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
